<table width="100%" border="0" cellspacing="0" cellpadding="0" class="from_table">
  <tr>
    <th width="100" height="51" align="left" style="  padding-left:10px"><tpl> $langSysSOneDayFluxContrast </tpl> 
    | <a href="javascript:;" onclick="ajax_link();"><tpl> $langSysSManyDayFluxContrast </tpl>
    </a></th>
    <th height="51" align="left" style=" text-align:left">&nbsp;</th>
    <th height="51" align="left" style=" text-align:left">&nbsp;</th>
  </tr>
  <tr>
    <th width="100" ><tpl>$langSysSPleaseSelectTime </tpl>：</th>
    <td width="250" align="left"><input name="time" 
      
      
      
      
      <tpl> if $input.time eq '1' || $input.time eq '' </tpl> checked="checked" <tpl> /if </tpl> type="radio" value="1" onclick="ajax_list(this.value,'
      <tpl> $input.type </tpl>');" />
      <tpl> $langSysSYesterday </tpl>
<input name="time" <tpl> if $input.time eq '2' </tpl> 
checked="checked" <tpl> /if </tpl> type="radio" value="2" onclick="ajax_list(this.value,'
<tpl> $input.type </tpl>');" /><tpl> $langSysSBeforeYesterday </tpl>
<input type="text" name="txt_time" style="border:solid 1px #B0DF82; width:100px; background:url(../js/calendar/blue/cal_btn.gif) no-repeat right; height:18px; padding-right:19px; cursor:pointer;" id="txt_time" size="15" readonly="readonly" value="<tpl> if $input.time neq '1' && $input.time neq '2' </tpl><tpl> $input.time </tpl><tpl> /if </tpl>" /> 
<label style="display:none;" for="f_date" class="error" metaDone="true" generated="true"></label></td>
    <td align="left"><span class="btn_left">
    <input type="button" id="button" class="btn_submit" onclick="ajax_list(document.getElementById('txt_time').value,'<tpl> $input.type </tpl>');" value="<tpl> $langSysSSubmit </tpl>"/></span></td>
  </tr>
</table>



<br />
<!-- 日历 -->


<div style=" clear:both;width:670px; padding-left:10px">
<tpl> $statics_flash </tpl></div>
<table class="from_table2_one top-1">
	  <thead>
	  <tr class="area_ajax_list_title">
	    <th class="pd-left" width="200"><tpl> $langSysSPeriodOfTime </tpl></th>
       	  <th width="200">PV</th>
          <th width="200">IP</th>
     </tr>
     </thead>
   <tr>
     <td class="pd-left" width="200" align="left"><tpl> $langSysSTotalize </tpl></td>
          <td width="200" align="left"><tpl> $pv_sum|default:'0' </tpl></td>
          <td width="200" align="left"><tpl> $ip_sum|default:'0' </tpl></td>
   </tr>
        <tpl> if $time_num[0].pv neq '' </tpl>
		<tpl> section name=i loop=$time_num </tpl>
   <tr>
     <td class="pd-left" width="200" align="left"><tpl> $smarty.section.i.rownum-1 </tpl>:00 - <tpl> $smarty.section.i.rownum </tpl>:00</td>
		  <td width="200" align="left"><tpl> $time_num[i].pv </tpl></td>
		  <td width="200" align="left"><tpl> $time_num[i].ip </tpl></td>
   </tr>
		<tpl> /section </tpl>
	    <tpl> else </tpl>
   <tr>
		  <td class="pd-left" align="center" colspan="3" valign="middle"><tpl> $langSysSThisTimeNotData </tpl></td>
   </tr>
	<tpl> /if </tpl>
</table>
<script type="text/javascript" language="javascript"> 
//普通日历
$(function(){
	 //datepicker
	$("#txt_time").datepicker();
})

function ajax_list(time,type){
	document.getElementById('button').disabled = true;
	$.ajax({
		url: "statics_time.manage.php",
		data: 'action=list&time='+time+'&type='+type,
		type:'get',
		dataType:"html",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			$("#result_content").html(msg);
			hideLoading();
		}
	});
	return false;
}

/* 切换页面 */function ajax_link(){
	$.ajax({
		url: "statics_time.manage.php",
		data: 'action=contrast',
		type:'get',
		dataType:"html",
		beforeSubmit:  showLoading(showText),   // 提交之前执行的方法
		success: function(msg){
			$("#result_content").html(msg);
			hideLoading();
		}
	});
	return false;
}
</script>